<?php
$userid         = get_loggedin_userid();
$interest_id    = get_input('interest_id');

$result = 0;
$result += delete_interest_ratings_history($interest_id, $userid);
$result += delete_interest_ratings($interest_id, $userid);

if($result)
    echo json_encode(export_result(200, $result));
else
    echo json_encode(export_result(400, 'Error! Cannot delete the rating.'));

?>